<!--
 * @Description: 研判模板
 * @Author: 丁飞洋
 * @Date: 2025-09-10 14:20:52
 * @LastEditTime: 2025-09-17 10:02:34
 * @LastEditors: 丁飞洋
-->
<template>
  <!-- <BaseNode> -->
  <div class="assessTemplate">
    <div class="tag-list">
      <a-tooltip placement="top" v-for="(item, i) in tagList" :key="i">
        <template #title>
          <span>{{ item }} </span>
        </template>
        <a-tag class="tag" color="processing">{{
          item[item.length - 1]
        }}
        </a-tag>
      </a-tooltip>
    </div>
    <div class="text">
      {{ text }}
    </div>
    <div class="time">{{ time }}</div>
  </div>
  <!-- </BaseNode> -->
</template>

<script setup>
import { ref, onMounted } from 'vue'
// import BaseNode from '../Node/BaseNode.vue'
const tagList = ref([])
const text = ref("")
const time = ref("")
// const { node } = ref({

// })
const node = {
  data: {
    AssessFormState: {
      type: [
        "测试1",
        "测试2",
        "测试3",
        "测试4",
        "测试5",
        "测试6",
      ],
      time: "2025-09-12 14:58:60",
      desc: "根据您遇到的错误信息和之前的对话历史，这个错误表明在Promise异步操作中尝试访问了一个未定义对象的getYCZSList方法。结合您之前询问的Vue3组件通信和弹窗组件实现，我将详细分析可能的原因和解决方案。"
    }
  }
}
// 接受父组件传值
// 首次加载
onMounted(() => {
  tagList.value = node.data.AssessFormState.type;
  text.value = node.data.AssessFormState.desc
  time.value = node.data.AssessFormState.time
})

</script>

<style scoped>
.assessTemplate {
  position: relative;
  /* min-width: 400px; */
  min-height: 200px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  padding: 10px 24px 24px 24px;
  overflow-y: auto;
}

.tag-list {
  display: flex;
  justify-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tag {
  margin: 0px;
  margin-bottom: 6px;
  margin-right: 10px;
  width: 165px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text {
  font-size: 12px;
}

.time {
  position: absolute;
  bottom: 4px;
  right: 12px;
  font-size: 10px;
}
</style>
